package com.hualian.system.common;

import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Set;

import org.springframework.beans.factory.annotation.Autowired;

import com.hualian.system.service.SystemService;

/**
 * 将系统参数缓存起来
 * @author Val
 *
 */
public class SystemParameter {
	
	private SystemParameter(){
		
	}
	
	@Autowired
	private SystemService systemService;
	
	//获得实例
	public static SystemParameter getInstance(){
		return Instance.systemParameter;
	}
	
	//存放系统参数
	private static  Map<String,Object> systemParameters = new HashMap<String, Object>();
	
	
	/**
	 * 清空系统参数Map
	 */
	public static void clearSystemParameters(){
		systemParameters.clear();
	}
	
	
	public static Map<String, Object> getSystemParameters() {
		return systemParameters;
	}



	public static void setSystemParameters(Map<String, Object> systemParameters) {
		SystemParameter.systemParameters = systemParameters;
	}



	static class Instance{
		private static SystemParameter systemParameter = new SystemParameter();
	}
}
